package com.example.vue.sys.action;

import com.example.vue.sys.service.SysExceptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 异常接口类
 *
 * @author zhouxl
 * @DATE 2020/12/18
 * @descriptoin
 */
@RestController
@RequestMapping("api/sysException")
public class SysExceptionAction {

    @Autowired
    private SysExceptionService sysExceptionService;

    /**
     * 查询异常的数量信息
     *
     * @return
     */
    @RequestMapping(value = "queryExceptionNum", method = RequestMethod.POST)
    public Object queryExceptionNum(@RequestParam Map<String, Object> params) {
        return sysExceptionService.queryExceptionNum(params);
    }

    /**
     * 查询异常类型的数量信息
     *
     * @return
     */
    @RequestMapping(value = "queryExceptionType", method = RequestMethod.POST)
    public Object queryExceptionType(@RequestParam Map<String, Object> params) {
        return sysExceptionService.queryExceptionType(params);
    }

    /**
     * 查询异常的信息列表
     *
     * @param params
     * @return
     */
    @RequestMapping(value = "queryExceptionList", method = RequestMethod.POST)
    public Object queryExceptionList(@RequestParam Map<String, Object> params) {
        return sysExceptionService.queryExceptionList(params);
    }

    /**
     * 查询异常详情信息
     *
     * @param params
     * @return
     */
    @RequestMapping(value = "queryExceptionDetial", method = RequestMethod.POST)
    public Object queryExceptionDetial(@RequestParam Map<String, Object> params) {
        return sysExceptionService.queryExceptionDetial(params);
    }

}
